package com.itheima.controller;

import com.itheima.service.StatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author wmh
 * @version 1.0 2022/6/7
 * @Description: 统计
 **/
@RestController
@RequestMapping("/stat")
public class StatController {
    @Autowired
    private StatService statService;

    @GetMapping(value = "/columnCharts",name="统计各部门人数--柱状图")
    public List<Map> columnCharts(){
        return statService.columnCharts();
    }

    @GetMapping(value = "/lineCharts",name="月份入职人数统计--折线图")
    public List<Map> lineCharts(){
        return statService.lineCharts();
    }
//    //员工地方来源统计--饼状图
//    pieCharts()
}